package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.bo.*;
import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.SRevenueDetail;
import com.tiancheng.trade.settlement.vo.settlement.api.NcCloudReqVO;
import com.tiancheng.trade.settlement.vo.settlement.api.NcCloudResVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 收入明细
 * 此类为[代码工厂]自动生成，继承了JpaRepository类，已经拥有基本的增删改成操作
 * <其他请自行扩展>
 *
 * @time 2024-05-26 16:21
 * @GeneratedByCodeFactory
 */
@Repository
public interface SRevenueDetailMapper extends TYBaseMapper<SRevenueDetail> {
    /**
     * 统计收入汇总，根据
     * @return
     */
    List<SRevenueSummaryBO> getSRevenueSummaryGroupByRevenueType(@Param("param") BaseRevenueQueryBO baseRevenueQueryBO);

    /**
     * 获取收入明细，根据商品汇总
     * @param baseRevenueQueryBO 查询参数
     * @return
     */
    List<SRevenueDetailQueryResBo> getSRevenueDetailGroupByProductCode(@Param("param") BaseRevenueQueryBO baseRevenueQueryBO);

    /**
     * 获取收入明细总数
     * @param baseRevenueQueryBO 查询参数
     * @return
     */
    Integer getSRevenueDetailGroupByProductCodeCount(@Param("param") BaseRevenueQueryBO baseRevenueQueryBO);

    /**
     * 商户+场景纬度纬度汇总对账函信息
     * @param queryBo
     * @return
     */
    List<SRevenueSettleLettersMerchantBo> summarySettleLettersMerchantInfo(@Param("param")SSettleLettersDetailQueryBO queryBo);

    /**
     * 商户对账函明细
     * @param queryBo
     * @return
     */
    List<SRevenueSettleLettersMerchantDetailBo> detailSettleLettersMerchantInfo(@Param("param")SSettleLettersDetailQueryBO queryBo);

    /**
     * 统计组织机构的收入数据
     * @param ncCloudReqVO 查询参数
     * @return
     */
    List<NcCloudResVO> getRevenueByOrg(@Param("param") NcCloudReqVO ncCloudReqVO );
    /**
     * 统计组织机构的收入数据量
     * @param ncCloudReqVO 查询参数
     * @return
     */
    Integer getRevenueByOrgCount(@Param("param") NcCloudReqVO ncCloudReqVO );
}